package com.originskyseed.platform.user.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.originskyseed.platform.user.model.AnchorRelateGroup;

/**
 * 主播关联分组信息表Mapper类（OSI_ANCHOR_RELATE_GROUP）
 *
 * @author WuZhuoXi
 */
public interface AnchorRelateGroupMapper {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(AnchorRelateGroup record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(AnchorRelateGroup record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(AnchorRelateGroup record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(AnchorRelateGroup record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AnchorRelateGroup selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<AnchorRelateGroup> selectList(AnchorRelateGroup record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<AnchorRelateGroup> selectListByPage(Map<String, Object> params) throws Exception;

	/**
	 * 查询主播分组列表
	 *
	 * @param anchorId
	 * @return
	 * @throws Exception
	 */
	public List<AnchorRelateGroup> selectAnchorGroupListByAnchorId(@Param("anchorId") String anchorId) throws Exception;

	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatchList(@Param("list") List<AnchorRelateGroup> list) throws Exception;

	/**
	 * 根据groupId删除记录
	 *
	 * @param groupId
	 * @return
	 * @throws Exception
	 */
	public int deleteByGroupId(String groupId) throws Exception;
}
